<template>
  <div id="nav">
    <div class="public_left">
      <router-link to="/">
        <em></em>
        <img class="index_logo" src="http://www.juyike.cn/Public/Home/images/logo2020.png" />
      </router-link>
      <ul class="menu">
        <li class="active_lis" v-for="(item,index) in listTabledata" :key="index">
          <router-link :to="item.path" v-if="item.parentId == 0"><em></em>{{item.titleName}}</router-link>
          <ol v-else>
            <li><router-link :to="item.path">{{item.titleName}}</router-link></li>
          </ol>
        </li>

        <!-- 写的时候把这个打开就行OK -->
        <!-- <li class="active_lis">
          <router-link to="/enterprise"><em></em>走进聚益科</router-link>
          <ol>
            <li><router-link to="/enterprise">企业概况</router-link></li>
            <li><router-link to="/industry">产业运营</router-link></li>
            <li><router-link to="/culture">企业文化</router-link></li>
          </ol>
        </li>
        <li class="active_lis">
          <router-link to="/follow"><em></em>关注聚益科</router-link>
        </li>
        <li class="active_lis">
          <router-link to="/meet"><em></em>聚首聚益科</router-link>
          <ol>
            <li><router-link to="/personnel">人才机制</router-link></li>
            <li><router-link to="/colourful">多彩聚益科</router-link></li>
            <li><router-link to="/staff">员工风采</router-link></li>
            <li><router-link to="/join">加入我们</router-link></li>
          </ol>
        </li> -->
      </ul>
    </div>
    <ul class="sidebarNav">
      <li>
        <em></em>
        <span>
          <img src="http://www.juyike.cn/Public/Home/images/zrjkewm.jpg" />
        </span>
      </li>
      <li>
        <em></em>
        <span>
          总机: 010-50916999
          <br />
          传真: 010-50916990
        </span>
      </li>
      <li>
        <em></em>
        <span>
          <a href="https://map.baidu.com/?shareurl=1&poiShareUid=c0e7ff39976a1f9dae31e547">
            <img src="http://www.juyike.cn/Public/Home/images/address.jpg" />
          </a>
        </span>
      </li>
      <li>
        <em></em>
        <span>
          <div>
            <h3>源动力IOS版</h3>
            <img src="http://www.juyike.cn/Public/Home/images/IOS.png" />
          </div>
          <div>
            <h3>源动力Android版</h3>
            <img src="http://www.juyike.cn/Public/Home/images/Android.jpg" />
          </div>
        </span>
      </li>
    </ul>
  </div>
  <router-view />
</template>
<script>
import { list_url_list } from '@/api/index.js';
export default {
  data() {
    return {
      listTabledata:[]
      
    };
  },
  created() {
    this.getData();
  },
  methods: {
     
    // 获取菜单栏数据
    getData() {
      list_url_list().then(res=> {
        this.listTabledata = res.data
        console.log(res.data,'******************');
      })
      .catch(error=>{
          console.log(error)
      });
    },
  },
  mounted() {
    
    
  },
  computed: {},
};
</script>



<style lang="less">
* {
  padding: 0;
  margin: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: left;
  color: #2c3e50;
}
#nav {
  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
  .public_left {
    width: 12.5%;
    height: 100vh;
    min-width: 150px;
    background: #3c3c3c;
    position: fixed;
    top: 0;
    left: auto;
    z-index: 55;
    -webkit-animation: leftNav .7s 3s ease both;
    -moz-animation: leftNav .7s 3s ease both;
    animation: leftNav .7s 3s ease both;
    .index_logo {
      width: 85%;
      margin: 0 auto;
      margin-top: 30px;
      display: block;
    }
    .menu {
      margin-top: 7%;
      li {
        color: #fff;
        text-align: center;
        position: relative;
        a {
          color: #fff;
          font-weight: 500;
          font-size: 18px;
          height: 50px;
          line-height: 50px;
          width: 100%;
          display: block;
          text-decoration: none;
        }
        em {
          width: 7px;
          height: 7px;
          border: 1px solid #fff;
          border-radius: 50%;
          display: inline-block;
          margin: 20px 14px 0 -21px;
        }
      }
      li ol li:hover {
        background: #a90621;
      }
    }
  }
  .sidebarNav {
    position: fixed;
    right: 0;
    top: 35%;
    z-index: 100;
    li {
      list-style-type: none;
      width: 60px;
      height: 60px;
      background: #4d4d4d;
      border-radius: 5px;
      margin-top: 1px;
      text-align: center;
      position: relative;
      em {
        background: url(./../src/assets/navIcon.png) no-repeat;
        display: inline-block;
        margin-top: 10px;
      }
      span {
        padding: 10px;
        background: #4e4e4e;
        border-radius: 8px;
        display: none;
        position: absolute;
        left: -190px;
        top: -60px;
        z-index: 0;
        img {
          width: 100%;
          border: none;
          vertical-align: middle;
        }
      }
    }
  }
  .sidebarNav li span:before {
    content: "";
    width: 0;
    height: 0;
    border-width: 8px 0 8px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #4e4e4e;
    position: absolute;
    right: -8px;
    top: 80px;
  }
  .sidebarNav li:nth-of-type(2) span {
    text-align: center;
    color: #fff;
    font-size: 16px;
    top: 0;
    left: -180px;
  }
  .sidebarNav li:nth-of-type(2) span:before {
    top: 25px;
  }
  .sidebarNav li:nth-of-type(3) span {
    left: -485px;
    background: none;
  }
  .sidebarNav li:nth-of-type(4) span {
    width: 330px;
    height: 193px;
    font-size: 16px;
    color: #FFF;
    left: -366px;
  }
  .sidebarNav li:nth-of-type(4) h3 {
    line-height: 1;
    padding: 12px 0;
    text-align: center;
  }
  .sidebarNav li:nth-of-type(4) span div:first-child {
    position: absolute;
    left: 26px;
  }
  .sidebarNav li:nth-of-type(4) span div:last-child {
    position: absolute;
    right: 26px;
  }
  .sidebarNav li em:hover + span {
    display: inline-block;
  }
  .sidebarNav li:nth-of-type(1) em {
    width: 40px;
    height: 34px;
    background-position: 0 0;
  }
  .sidebarNav li:nth-of-type(1) em:hover {
    background-position: 0 -37px;
  }
  .sidebarNav li:nth-of-type(2) em {
    width: 28px;
    height: 36px;
    background-position: -41px 0;
  }
  .sidebarNav li:nth-of-type(2) em:hover {
    background-position: -41px -37px;
  }
  .sidebarNav li:nth-of-type(3) em {
    width: 34px;
    height: 34px;
    background-position: -69px 0;
  }
  .sidebarNav li:nth-of-type(3) em:hover {
    background-position: -69px -37px;
  }
  .sidebarNav li:nth-of-type(4) em {
    width: 31px;
    height: 36px;
    background: url(./../src/assets/weimaCur.png) no-repeat;
  }
  .sidebarNav li:nth-of-type(4) em:hover {
    width: 31px;
    height: 36px;
    background: url(./../src/assets/weima.png) no-repeat;
  }
}
</style>
